package cn.itlaobing.mq;


import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;

public class ConsumerController implements MessageListener {


    @Override
    public void onMessage(Message message) {
        //try {
            System.out.println("message:" + new String(message.getBody()));
            int i = 1 / 0;
//        } catch (Exception e) {
//            e.printStackTrace();
//            //此处抛出异常信息，可让其他节点重复处理直到成功
//            throw new RuntimeException(e);
//        }
    }

}
